# Contributor: psykose <alice@ayaya.dev>
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=dosbox-staging
pkgver=0.78.1
pkgrel=0
pkgdesc="revitalized dosbox DOS-emulator"
url="https://dosbox-staging.github.io/"
arch="all !x86" # TEXTREL on x86
license="GPL-2.0-or-later"
options="!check" # no
depends="!dosbox" # dosbox provides same binary in /usr/bin/dosbox
makedepends="
	alsa-lib-dev
	fluidsynth-dev
	libexecinfo-dev
	libpng-dev
	libslirp-dev
	opus-dev
	opusfile-dev
	sdl2-dev
	sdl2_net-dev
	meson
	"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/dosbox-staging/dosbox-staging/archive/v$pkgver.tar.gz
	fix-execinfo.patch
	"

build() {
	abuild-meson \
	--prefix /usr \
	--buildtype=release \
	-Duse_mt32emu=false \
	. output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
5d1ef6f6312f44821f5f0e54db957a9236e943dc847c480e766159dd6237500686a3763211dabe1223837f9590d909f1496781dedc24d2f41e6836014dac77a5  dosbox-staging-0.78.1.tar.gz
a13ef7270994385681e0ed557ebbbc05cd7a29c49e0ab9338360c99134ed4d3937bd9102453c0550d73e02f9503e5cf885f4a258c89e2ceb2db35f2a27585ff9  fix-execinfo.patch
"
